//
//  httpRequst.h
//  afNetWorkingDemo
//
//  Created by whalefin on 5/24/14.
//  Copyright (c) 2014 whalefin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "UIAlertView+Blocks.h"

typedef void (^CompletionBlock)(void);

@interface httpRequst : NSObject
//用来封装afnetworking中的post，参数与其一模一样，就是多添加了两个可接收的数据文档类型
+ (void)POST:(NSString *)URLString
                      parameters:(id)parameters
                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

+ (void)POST:(NSString *)URLString parameters:(id)parameters imagePath:(NSString *)filePath imageName:(NSString *)imageName keyWords:(NSString *)keyWords success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

+(void)POST:(NSString *)URLString parameters:(id)parameters imagePathArray:(NSMutableArray *)filePathArray imageName:(NSString *)imageName keyWords:(NSString *)keyWords success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

+ (void)GET:(NSString *)URLString
  parameters:(id)parameters
     success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
     failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

@end
